package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SPanicBuyItemMsg extends Object implements IMessageBase
    {
        public var type:int;
        public var itemCode:int;
        public var price:int;
        public var discount:int;
        public var buyLimit:int;
        public var leftAmount:int;
        public const _type:int = 12030;
        public static var _regist:SPanicBuyItemMsg = new SPanicBuyItemMsg(true);

        public function SPanicBuyItemMsg(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SPanicBuyItemMsg();
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.type);
            param1.writeInt(this.itemCode);
            param1.writeInt(this.price);
            param1.writeInt(this.discount);
            param1.writeInt(this.buyLimit);
            param1.writeInt(this.leftAmount);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.type = param1.readInt();
            this.itemCode = param1.readInt();
            this.price = param1.readInt();
            this.discount = param1.readInt();
            this.buyLimit = param1.readInt();
            this.leftAmount = param1.readInt();
            
        }

    }
}
